package com.sinosoft.cloud.configuration;

import com.sinosoft.cloud.annotation.BusinessType;
import com.sinosoft.cloud.annotation.ChannelType;
import com.sinosoft.cloud.annotation.ReqJsonBean;

import java.util.HashMap;

/**
 * 描述:
 *
 * @author 张旭东
 * @date 2018/11/27
 */
public class JsonMakerContainer {
    private JsonMakerContainer() {
    }

    private static JsonMakerContainer jsonMakerContainer = new JsonMakerContainer();

    public static JsonMakerContainer getInstance() {
        return jsonMakerContainer;
    }

    private HashMap<String, ReqJsonBean> jsonMap = new HashMap();

    public void addJsonBean(ChannelType channelType, BusinessType businessType, ReqJsonBean reqJsonBean) {
        jsonMap.put(String.valueOf(channelType) + String.valueOf(businessType), reqJsonBean);
    }

    public ReqJsonBean getJsonBean(String key) {
        return  jsonMap.get(key);
    }
}
